﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace autoBidProject
{
    class League
    {
        private string name;
        private List<Match> matchs;

        
        public League(string name)
        {
            this.name = name;
            this.matchs = new List<Match>();
        }

        public void Add(Match match)
        {
            this.matchs.Add(match);
        }

        public Match GetMatch(string name)
        {
            foreach (Match match in matchs)
                if (match.Name().CompareTo(name) == 0)
                    return match;
            return null;
        }

        internal List<Match> Matchs
        {
            get { return matchs; }
            set { matchs = value; }
        }

    }
}
